Class WorkspaceImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.ui.impl.WorkspaceImpl
All Implemented Interfaces:
IPCObject, Workspace

public class WorkspaceImpl extends IPCObjectImpl implements Workspace
Information provided by the PKI file:

    \class Workspace
    
    \brief Workspace is the base class for Logical and Physical workspace related objects.
    
    \example appWindow().getActiveWorkspace()
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • isLogicalView

      public boolean isLogicalView()
      Information provided by the PKI file:
      
          \brief Returns true if the Logical workspace is currently visible, otherwise false.
          
          \return bool, true if the Logical workspace is currently visible, otherwise false.
          
              
      Specified by:
      isLogicalView in interface Workspace
      Returns:
      boolean Returns a boolean
    • isGeoView

      public boolean isGeoView()
      Information provided by the PKI file:
      
          \brief Returns true if the Physical workspace is currently visible, otherwise false.
          
          \return bool, true if the Physical workspace is currently visible, otherwise false.
          
              
      Specified by:
      isGeoView in interface Workspace
      Returns:
      boolean Returns a boolean
    • isRackView

      public boolean isRackView()
      Information provided by the PKI file:
      
          \brief Returns true if the wiring closet is currently visible, otherwise false.
          
          \return bool, true if the wiring closet is currently visible, otherwise false.
          
              
      Specified by:
      isRackView in interface Workspace
      Returns:
      boolean Returns a boolean
    • getLogicalWorkspace

      public LogicalWorkspace getLogicalWorkspace()
      Information provided by the PKI file:
      
          \brief Returns the Logical workspace.
          
          \return LogicalWorkspace, the Logical object.
          
              
      Specified by:
      getLogicalWorkspace in interface Workspace
      Returns:
      LogicalWorkspace Returns a LogicalWorkspace
    • getGeoView

      public GeoView getGeoView()
      Information provided by the PKI file:
      
          \brief Returns the Physical workspace.
          
          \return GeoView, the GeoView object.
          
              
      Specified by:
      getGeoView in interface Workspace
      Returns:
      GeoView Returns a GeoView
    • getRackView

      public RackView getRackView()
      Information provided by the PKI file:
      
          \brief Returns the wiring closet.
          
          \return RackView, the RackView object.
          
              
      Specified by:
      getRackView in interface Workspace
      Returns:
      RackView Returns a RackView
    • getRootPhysicalObject

      public PhysicalObject getRootPhysicalObject()
      Information provided by the PKI file:
      
          Returns the root/top item in the physical workspace location tree
          
              
      Specified by:
      getRootPhysicalObject in interface Workspace
      Returns:
      PhysicalObject Returns a PhysicalObject
    • getCurrentPhysicalObject

      public PhysicalObject getCurrentPhysicalObject()
      Information provided by the PKI file:
      
          \brief Returns the current physical location.
          
          \return PhysicalObject, the PhysicalObject object.
          
              
      Specified by:
      getCurrentPhysicalObject in interface Workspace
      Returns:
      PhysicalObject Returns a PhysicalObject
    • setLogicalBackgroundPath

      public void setLogicalBackgroundPath(String path, boolean tiled)
      Information provided by the PKI file:
      
          \brief Sets the background image of the logical workspace
          
          \param tiled, true if the image will be used as tiled layout and false if not
          
          \returns none
          
              
      Specified by:
      setLogicalBackgroundPath in interface Workspace
      Parameters:
      path - Takes in a parameter of path
      tiled - Takes in a parameter of tiled
    • devicesAt

      public List<String> devicesAt(int x, int y, int w, int h, boolean includeClusters)
      Information provided by the PKI file:
      
          \brief Returns a list of devices within a rectangle with specified with and height right of the specified location
          
          \param x, x coordinate of the specified location
          
          \param y, y coordinate of the specified location
          
          \param w, width of the rectangle that contains the devices to be included
          
          \param h, height of the rectangle that contains the devices to be included
          
          \param includeClusters, true if including devices inside the cluster and false if not including
          
          \returns vector<QString> of device names
          
              
      Specified by:
      devicesAt in interface Workspace
      Parameters:
      x - Takes in a parameter of x
      y - Takes in a parameter of y
      w - Takes in a parameter of w
      h - Takes in a parameter of h
      includeClusters - Takes in a parameter of includeClusters
      Returns:
      List<String> Returns a List<String>
    • setComponentOpacity

      public void setComponentOpacity(String deviceName, String componentName, double value)
      Information provided by the PKI file:
      
          \brief Set the opacity for a component
          
          \param deviceName, device name
          
          \param componentName, component name
          
          \param value, the opacity value
          
          \returns none
          
              
      Specified by:
      setComponentOpacity in interface Workspace
      Parameters:
      deviceName - Takes in a parameter of deviceName
      componentName - Takes in a parameter of componentName
      value - Takes in a parameter of value
    • fillColor

      public void fillColor(String deviceName, String componentName, int red, int green, int blue)
      Information provided by the PKI file:
      
          \brief Fill the component with a specified color
          
          \param deviceName, device name
          
          \param componentName, component name
          
          \param red, the rbg red value
          
          \param green, the rbg green value
          
          \param blue, the rbg blue value
          
          \returns none
          
              
      Specified by:
      fillColor in interface Workspace
      Parameters:
      deviceName - Takes in a parameter of deviceName
      componentName - Takes in a parameter of componentName
      red - Takes in a parameter of red
      green - Takes in a parameter of green
      blue - Takes in a parameter of blue
    • setComponentRotation

      public void setComponentRotation(String deviceName, String componentName, double value)
      Information provided by the PKI file:
      
          \brief Set the rotation for a component
          
          \param deviceName, device name
          
          \param componentName, component name
          
          \param value, the rotation value
          
          \returns none
          
              
      Specified by:
      setComponentRotation in interface Workspace
      Parameters:
      deviceName - Takes in a parameter of deviceName
      componentName - Takes in a parameter of componentName
      value - Takes in a parameter of value
    • setThingRotation

      public void setThingRotation(String deviceName, double value)
      Information provided by the PKI file:
      
          \brief Set the rotation for a thing
          
          \param deviceName, device name
          
          \param value, the rotation value
          
          \returns none
          
              
      Specified by:
      setThingRotation in interface Workspace
      Parameters:
      deviceName - Takes in a parameter of deviceName
      value - Takes in a parameter of value
    • setThingCustomText

      public void setThingCustomText(String deviceName, int x, int y, int width, int height, String text)
      Information provided by the PKI file:
      
          \brief Set the custom text for Thing at a location
          
          \param deviceName, device name
          
          \param x, the x coordinate of where the text will show up
          
          \param y, the y coordinate of where the text will show up
          
          \param width, the width the text
          
          \param height, the height of the text
          
          \param text, the string to show up
          
          \returns none
          
              
      Specified by:
      setThingCustomText in interface Workspace
      Parameters:
      deviceName - Takes in a parameter of deviceName
      x - Takes in a parameter of x
      y - Takes in a parameter of y
      width - Takes in a parameter of width
      height - Takes in a parameter of height
      text - Takes in a parameter of text
    • hasProperty

      public boolean hasProperty(String prop)
      Information provided by the PKI file:
      
          \brief Check if the a property is defined
          
          \param prop, property name
          
          \returns bool, true if it contains the property and false if not
          
              
      Specified by:
      hasProperty in interface Workspace
      Parameters:
      prop - Takes in a parameter of prop
      Returns:
      boolean Returns a boolean
    • getProperty

      public String getProperty(String prop)
      Information provided by the PKI file:
      
          \brief Return the property value
          
          \param prop, property name
          
          \returns QString, property value
          
              
      Specified by:
      getProperty in interface Workspace
      Parameters:
      prop - Takes in a parameter of prop
      Returns:
      String Returns a String
    • setProperty

      public void setProperty(String prop, String value)
      Information provided by the PKI file:
      
          \brief Set the property value
          
          \param prop, property name
          
          \param value, property value
          
          \returns none
          
              
      Specified by:
      setProperty in interface Workspace
      Parameters:
      prop - Takes in a parameter of prop
      value - Takes in a parameter of value
    • getProperties

      public List<String> getProperties()
      Information provided by the PKI file:
      
          \brief Return a list of properties defined
          
          \returns vector<QString>, list of property names
          
              
      Specified by:
      getProperties in interface Workspace
      Returns:
      List<String> Returns a List<String>
    • pauseEnvironmentTime

      public void pauseEnvironmentTime()
      Information provided by the PKI file:
      
          \brief Pause the Environemnt time
          
          \returns none
          
              
      Specified by:
      pauseEnvironmentTime in interface Workspace
    • resumeEnvironmentTime

      public void resumeEnvironmentTime()
      Information provided by the PKI file:
      
          \brief Resume the Environemnt time
          
          \returns none
          
              
      Specified by:
      resumeEnvironmentTime in interface Workspace
    • getEnvironmentTimeInSeconds

      public int getEnvironmentTimeInSeconds()
      Information provided by the PKI file:
      
          \brief Get Environment time in seconds
          
          \returns int, time in seconds
          
              
      Specified by:
      getEnvironmentTimeInSeconds in interface Workspace
      Returns:
      int Returns a int
    • resetEnvironment

      public void resetEnvironment()
      Information provided by the PKI file:
      
          \brief Reset the Environemnt time
          
          \returns none
          
              
      Specified by:
      resetEnvironment in interface Workspace
    • setParentGraphicFromComponent

      public void setParentGraphicFromComponent(String deviceName, String componentName, int index, boolean bOnLogical, boolean bOnPhysical)
      Information provided by the PKI file:
      
          \brief Set parent graphic from component
          \param deviceName, device name
          \param componentName, component name
          \param index, the image index to be used
          \param bOnLogical, if true, set parent graphic in logical workspace
          \param bOnPhysical, if true, set parent graphic in physical workspace
          \returns none
          
              
      Specified by:
      setParentGraphicFromComponent in interface Workspace
      Parameters:
      deviceName - Takes in a parameter of deviceName
      componentName - Takes in a parameter of componentName
      index - Takes in a parameter of index
      bOnLogical - Takes in a parameter of bOnLogical
      bOnPhysical - Takes in a parameter of bOnPhysical
    • moveItemInWorkspace

      public boolean moveItemInWorkspace(String itemName, int x, int y)
      Information provided by the PKI file:
      
          \brief Move item in workspace to a new location
          \param itemName, item name
          \param x, the x coordinate
          \param y, the y coordinate
          \returns none
          
              
      Specified by:
      moveItemInWorkspace in interface Workspace
      Parameters:
      itemName - Takes in a parameter of itemName
      x - Takes in a parameter of x
      y - Takes in a parameter of y
      Returns:
      boolean Returns a boolean
    • setBaseZLevel

      public void setBaseZLevel(String deviceName, float baseZLevel)
      Information provided by the PKI file:
      
          \brief Sets the base z level, which is the current z level plus the base level
          \param deviceName, item name
          \param baseZLevel, the base level
          \returns none
          
              
      Specified by:
      setBaseZLevel in interface Workspace
      Parameters:
      deviceName - Takes in a parameter of deviceName
      baseZLevel - Takes in a parameter of baseZLevel
    • getZLevel

      public float getZLevel(String deviceName)
      Information provided by the PKI file:
      
          \brief Returns the current z level
          \returns none
          
              
      Specified by:
      getZLevel in interface Workspace
      Parameters:
      deviceName - Takes in a parameter of deviceName
      Returns:
      float Returns a float
    • setVisible

      public void setVisible()
      Specified by:
      setVisible in interface Workspace
    • zoomIn

      public void zoomIn()
      Information provided by the PKI file:
      
          \brief Zooms into the workspace
          \returns none
          
              
      Specified by:
      zoomIn in interface Workspace
    • zoomOut

      public void zoomOut()
      Information provided by the PKI file:
      
          \brief Zooms out of the workspace
          \returns none
          
              
      Specified by:
      zoomOut in interface Workspace
    • zoomReset

      public void zoomReset()
      Information provided by the PKI file:
      
          \brief Resets the zoom scale of the workspace
          \returns none
          
              
      Specified by:
      zoomReset in interface Workspace